﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="View404Exceptions.aspx.cs" Inherits="EPiBoost.Core.Plugins.Gui.Admin.Viewe404Exceptions" %>
<%@ Import Namespace="EPiBoost.Core.Plugins.Gui.Admin" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>View 404 Exceptions</title>
    <!-- Mimic Internet Explorer 7 -->
    
    <%
        var cmsPath = EPiServer.Configuration.Settings.Instance.UIUrl.ToString();
        var shellPath = cmsPath.Replace("/CMS/", "/Shell/");
    %>

	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <link rel="stylesheet" type="text/css" href="<%= ResolveUrl(shellPath + "1.0.456/ClientResources/epi/themes/legacy/ShellCore.css") %>" />
    <script type="text/javascript" src="<%= ResolveUrl(shellPath + "1.0.456/ClientResources/ShellCore.js") %>"></script>
    <link rel="stylesheet" type="text/css" href="<%= ResolveUrl(shellPath + "1.0.456/ClientResources/epi/themes/legacy/ShellCoreLightTheme.css") %>" />
    <script type="text/javascript" src="<%= ResolveUrl(cmsPath  + "1.0.431/ClientResources/ReportCenter/ReportCenter.js") %>"></script>
    <link type="text/css" rel="stylesheet" href="<%= ResolveUrl(cmsPath + "1.0.431/ClientResources/Epi/Base/CMS.css") %>" />

    
</head>
<body>
    <form id="form1" runat="server">    
        <div class="epi-contentContainer epi-padding" style="max-width:100%">
     
        <div class="epi-contentArea">
            <h1>View 404 Exceptions <a href="" style="float:right; padding-right:10px"><img src="<%=ResolveUrl("~/App_Themes/Default/Images/Tools/refresh.gif") %>" /></a></h1>
            
            
            
            <style type="text/css">
        
                .errorDetails{ margin-bottom: 10px;
                    background: #F1F1F1;
                        border-color: #AEAEAE;
                        color: #000000;
                        text-shadow: 0 1px 0 #FFFFFF;
                    padding:5px;
                }

                 .errorDetails li {
                     list-style: circle;
                 }

            </style>
            
            <asp:PlaceHolder runat="server" Visible="false" ID="plhDetails">
                <div class="errorDetails">
                    <H1>404 URL : <asp:Literal runat="server" ID="ltlDetailUrl" /></H1>
                    Inbound Links : 
                    <ul>
                     <asp:Repeater runat="server" ID="rptInbound">
                         <ItemTemplate>
                            <li><%# Container.DataItem %>  </li>
                         </ItemTemplate>
                     </asp:Repeater>
                     </ul>
                    
                    <a href="CustomRedirects.aspx?edit=1&oldurl=<%=Server.UrlEncode(ltlDetailUrl.Text) %>">Add Custom Redirect</a>
                </div>
            </asp:PlaceHolder>

            <asp:Repeater runat="server" ID="rptErrors">
                <HeaderTemplate>
                    <table>
                        <tr> 
                            <th>Url</th>
                            <th>Hits</th>    
                            <th>Last Occurred</th>                     
                            <th style="width:150px;"></th>        
                            <th style="width:150px;"></th>   
                        </tr>
                </HeaderTemplate>

                <ItemTemplate>
                <tr>
                    <td><%# Eval("Uri")%></td>
                    <td><%# Eval("Count")%></td>      
                    <td><%# Eval("LatestDate")%></td>    
                    <td style="text-align: center"><a href="?details=<%# Server.UrlEncode((string)Eval("Uri")) %>">View Inbound Links</a></td>
                    <td style="text-align: center"><a href="<%=ResolveUrl(RegisterResources.FilePathCustomRedirects) %>?edit=1&oldurl=<%# Server.UrlEncode((string)Eval("Uri")) %>">Add Custom Redirect</a></td>
                </tr>              
                </ItemTemplate>


                <FooterTemplate>
                    </table>
                </FooterTemplate>

            </asp:Repeater>
        </div>

        </div>     
    </form>
</body>
</html>


 